#pragma GCC optimize(2)
#include <iostream>
#include <queue>
#include <map>
#include <unordered_map>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <cstring>
#include <set>
#include <unordered_set>
#define IOS ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
int main()
{
	int t;
	cin>>t;
	while(t--)
	{
		int n,m,k;
		cin>>n>>m>>k;
		int x,y;
		cin>>x>>y;
		int f=1;
		for(int i=1;i<=k;i++)
		{
			int a,b;
			cin>>a>>b;
			int num=abs(a-x)+abs(b-y);
			if(num%2==0) f=0;
		}
		if(f) cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
		
	} 

	return 0;
}

